home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
util
/
cdity
/
ModeProSrc.lha
/
Prefs
/
MPP_Init.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-10-16
|
1KB
|
41 lines
#include "mppexterns.h"
void SetupPenNodes(void)
{
ULONG pen;
NewList(&PenList);
for(pen=0;pen<NumDriPens;pen++)
{
// printf("%d\n",pen);
pennode[pen].PenNumber =PenNumbers[pen];
pennode[pen].Pen_Node.ln_Name=PenNames[pen];
pennode[pen].Pen_Node.ln_Succ=pennode[pen].Pen_Node.ln_Pred=0;
AddTail(&PenList,(struct Node *)&pennode[pen]);
}
}
void FixScreenModeNames(void)
{
struct DefaultNode *dn;
STRPTR newname;
ObtainSemaphore(&MPSem->NodeSem);
dn=(struct DefaultNode *)MPSem->PromotionList[PL_SCREENMODES].lh_Head;
while(dn->Def_Node.ln_Succ)
{
// printf("%8lx\n",dn->OrigDisplayID);
if(dn->OrigDisplayID!=0xffffffff)// (4.57.9)
{
if(newname=GetModeName(dn->OrigDisplayID))
{
FreeVec(dn->Def_Node.ln_Name);
dn->Def_Node.ln_Name=newname;
}
}
dn=(struct DefaultNode *)dn->Def_Node.ln_Succ;
}
ReleaseSemaphore(&MPSem->NodeSem);
}